home *** CD-ROM | disk | FTP | other *** search
- /* layout routines.h -- Line Layout calls
-
- by Eric Mader and Dave Opstad,
- with special thanks to the following folks:
- • Mark Davis, for starting it all off;
- • Russ Sonnenschein, for many good ideas;
- • Cary Clark, Dave Good, Rob Johnson, Keith McGreggor, and Chris Yerga for the graphics system;
- • Richard Becker, Lynn Bekkala and Mike Reed for fonts and the font system;
- • Robert Dierkes and the SQE team for testing and good ideas;
- • Parry Kejriwal and Richard Klein, for font tools;
- • Diane Patterson, for great patience in writing documentation;
- • Hugo Ayala, Tom Dowdy, Dan Lipton, Sean Parent and the rest of the PrintShop;
- • Mitch Allen for managing to manage us; and
- • many other good folk at Apple!
- */
-
- /* Copyright ©1988-1994 Apple Computer, Inc. All rights reserved. */
-
- #pragma once
-
- #ifndef layoutRoutinesIncludes
- #define layoutRoutinesIncludes
-
- #ifndef graphicsTypesIncludes
- #include "graphics types.h"
- #endif
-
- #ifndef layoutTypesIncludes
- #include "layout types.h"
- #endif
-
- #ifndef graphicsLinkageIncludes
- #include "graphics linkage.h"
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- gxShape GXNewLayout(long textRunCount, const short textRunLengths[], const void *text[],
- long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
- const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
- const gxPoint *position) GXInlineCode(0x0, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- long GXGetLayout(gxShape layout, void *text, long *styleRunCount, short styleRunLengths[],
- gxStyle styles[], long *levelRunCount, short levelRunLengths[], short levels[],
- gxLayoutOptions *layoutOptions, gxPoint *position) GXInlineCode(0x1, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXSetLayout(gxShape layout, long textRunCount, const short textRunLengths[], const void *text[],
- long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
- const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
- const gxPoint *position) GXInlineCode(0x2, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXDrawLayout(long textRunCount, const short textRunLengths[], const void *text[],
- long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
- const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
- const gxPoint *position) GXInlineCode(0x3, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXSetLayoutParts(gxShape layout, gxByteOffset oldStartOffset, gxByteOffset oldEndOffset,
- long newTextRunCount, const short newTextRunLengths[], const void *newText[],
- long newStyleRunCount, const short newStyleRunLengths[], const gxStyle newStyles[],
- long newLevelRunCount, const short newLevelRunLengths[], const short newLevels[]) GXInlineCode(0x4, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXSetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
- gxShape insert) GXInlineCode(0x5, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- long GXGetLayoutParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, void *text,
- long *styleRunCount, short styleRunLengths[], gxStyle styles[], long *levelRunCount,
- short levelRunLengths[], short levels[]) GXInlineCode(0x6, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxShape GXGetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
- gxShape dest) GXInlineCode(0x7, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- long GXGetLayoutGlyphs(gxShape layout, gxGlyphcode *glyphs, gxPoint positions[], long advance[],
- gxPoint tangents[], long *runCount, short styleRuns[], gxStyle glyphStyles[]) GXInlineCode(0x8, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxByteOffset GXHitTestLayout(gxShape layout, const gxPoint *hitDown, gxHighlightType highlightType,
- gxLayoutHitInfo *hitInfo, gxShape hitTrackingArea) GXInlineCode(0x9, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxShape GXGetLayoutHighlight(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
- gxHighlightType highlightType, gxShape highlight) GXInlineCode(0xa, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxShape GXGetLayoutVisualHighlight(gxShape layout, gxByteOffset startOffset, long startLeadingEdge,
- gxByteOffset endOffset, long endLeadingEdge, gxHighlightType highlightType, gxShape highlight) GXInlineCode(0xb, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxShape GXGetLayoutCaret(gxShape layout, gxByteOffset offset, gxHighlightType highlightType,
- gxCaretType caretType, gxShape caret) GXInlineCode(0xc, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxByteOffset GXGetLayoutBreakOffset(gxShape layout, gxByteOffset startOffset, Fixed lineWidth,
- long hyphenationCount, const gxByteOffset hyphenationPoints[], boolean *startIsStaked,
- gxByteOffset *priorStake, gxByteOffset *nextStake) GXInlineCode(0xd, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- Fixed GXGetLayoutRangeWidth(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
- gxShape supplementaryText) GXInlineCode(0xe, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxShape GXNewLayoutFromRange(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
- const gxLayoutOptions *layoutOptions, gxShape supplementaryText) GXInlineCode(0xf, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxShape GXGetCaretAngleArea(gxShape layout, const gxPoint *hitPoint, gxHighlightType highlightType,
- gxShape caretArea, short *returnedRise, short *returnedRun) GXInlineCode(0x10, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXGetStyleBaselineDeltas(gxStyle baseStyle, gxBaselineType baseType,
- gxBaselineDeltas returnedDeltas) GXInlineCode(0x11, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- gxByteOffset GXGetRightVisualOffset(gxShape layout, gxByteOffset currentOffset) GXInlineCode(0x12, gxNeedClient|gxNeedHeap|gxNeedStack);
- gxByteOffset GXGetLeftVisualOffset(gxShape layout, gxByteOffset currentOffset) GXInlineCode(0x13, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXGetCompoundCharacterLimits(gxShape layout, gxByteOffset trial, gxByteOffset *minOffset,
- gxByteOffset *maxOffset, boolean *onBoundary) GXInlineCode(0x14, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXGetOffsetGlyphs(gxShape layout, gxByteOffset trial, long leadingEdge,
- gxLayoutOffsetState *offsetState, unsigned short *firstGlyph, unsigned short *secondGlyph) GXInlineCode(0x15, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXGetGlyphOffset(gxShape layout, long trial, long onLeftTop, gxByteOffset *offset,
- boolean *leadingEdge, boolean *wasRealCharacter) GXInlineCode(0x16, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXGetLayoutSpan(gxShape layout, Fixed *lineAscent, Fixed *lineDescent) GXInlineCode(0x17, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetLayoutSpan(gxShape layout, Fixed lineAscent, Fixed lineDescent) GXInlineCode(0x18, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXSetStyleRunControls(gxStyle target, const gxRunControls *runControls) GXInlineCode(0x19, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetStyleRunPriorityJustOverride(gxStyle target,
- const gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x1a, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetStyleRunGlyphJustOverrides(gxStyle target, long count,
- const gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x1b, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetStyleRunGlyphSubstitutions(gxStyle target, long count,
- const gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x1c, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetStyleRunFeatures(gxStyle target, long count, const gxRunFeature runFeatures[]) GXInlineCode(0x1d, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetStyleRunKerningAdjustments(gxStyle target, long count,
- const gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x1e, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- void GXSetShapeRunControls(gxShape target, const gxRunControls *runControls) GXInlineCode(0x1f, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetShapeRunPriorityJustOverride(gxShape target,
- const gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x20, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetShapeRunGlyphJustOverrides(gxShape target, long count,
- const gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x21, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetShapeRunGlyphSubstitutions(gxShape target, long count,
- const gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x22, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetShapeRunFeatures(gxShape target, long count, const gxRunFeature runFeatures[]) GXInlineCode(0x23, gxNeedClient|gxNeedHeap|gxNeedStack);
- void GXSetShapeRunKerningAdjustments(gxShape target, long count,
- const gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x24, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- long GXGetStyleRunControls(gxStyle source, gxRunControls *runControls) GXInlineCode(0x25, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetStyleRunPriorityJustOverride(gxStyle source,
- gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x26, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetStyleRunGlyphJustOverrides(gxStyle source,
- gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x27, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetStyleRunGlyphSubstitutions(gxStyle source, gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x28, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetStyleRunFeatures(gxStyle source, gxRunFeature runFeatures[]) GXInlineCode(0x29, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetStyleRunKerningAdjustments(gxStyle source, gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x2a, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- long GXGetShapeRunControls(gxShape source, gxRunControls *runControls) GXInlineCode(0x2b, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetShapeRunPriorityJustOverride(gxShape source,
- gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x2c, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetShapeRunGlyphJustOverrides(gxShape source,
- gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x2d, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetShapeRunGlyphSubstitutions(gxShape source, gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x2e, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetShapeRunFeatures(gxShape source, gxRunFeature runFeatures[]) GXInlineCode(0x2f, gxNeedClient|gxNeedHeap|gxNeedStack);
- long GXGetShapeRunKerningAdjustments(gxShape source, gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x30, gxNeedClient|gxNeedHeap|gxNeedStack);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-